﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using BulldogCMS.Data;

namespace BulldogCMS.Data.Tests
{
    [TestClass]
    public class DatabaseTest
    {
        [TestMethod]
        public void DatabaseHasInitializedProperties()
        {
            IDatabase db = new Database(
                Common.TestingDatabaseDefinitionProvider.CreateProvider(),
                Common.TestingStorage.CreateTestingStorage()
            );
            Assert.IsNotNull(db.Content, "Content folder not instantiated");
            Assert.IsNotNull(db.Files, "Files folder not instantiated");
            Assert.IsNotNull(db.Groups, "Groups folder not instantiated");
            Assert.IsNotNull(db.Users, "Users folder not instantiated");
            Assert.IsNotNull(db.Links, "Links folder not instantiated");
        }

        [TestMethod]
        public void TestGeneratedTree()
        {
            Common.TestingDatabaseDefinitionProvider.CreateProvider().GetTemplatesProvider();
            IDatabase db = new Database(Common.TestingDatabaseDefinitionProvider.CreateProvider(), Common.TestingStorage.CreateTestingStorage());
        }


    }
}
